# !/usr/bin/python3
# -*- coding:utf-8 -*-
"""
@author: JHC000abc@gmail.com
@file: init_db.py
@time: 2024/11/30 13:31 
@desc: 

"""
from db.model import UserInfo
from db.db_utils import SqlalchemyDB

sdb = SqlalchemyDB()


def init_user_info():
    """

    :return:
    """
    conditions = [
        {
            "user_name": "root",
            "password": "$2b$12$61d4HnC2zT.GNtEwQZ2reOcsAknqQdYJ9jfomJrlux8fnRlL9Tuai",
            "grade": "2",
        },
        {
            "user_name": "manage",
            "password": "$2b$12$61d4HnC2zT.GNtEwQZ2reOcsAknqQdYJ9jfomJrlux8fnRlL9Tuai",
            "grade": "1",
        },
        {
            "user_name": "user01",
            "password": "$2b$12$61d4HnC2zT.GNtEwQZ2reOcsAknqQdYJ9jfomJrlux8fnRlL9Tuai",
            "grade": "0",
        },
    ]
    res = sdb.insert(UserInfo, conditions)
    print(f"res:{res}")
    return res


init_user_info()
